Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

fix: adjust warning definitions within templates #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bill-ezhao
Copy link
Contributor

Running into an issue with the following error:

module.sendgrid_template.sendgrid_template.this[0]: Refreshing state... [id=d-816cf2609e4946de8517250773cd81db]
╷
│ Error: failed parsing template: json: cannot unmarshal object into Go struct field TemplateVersion.versions.warnings of type string
│

Looking at the API closely, we can see the definition for Warnings is actually an array of object, not string, which is what I'm thinking is the issue here for the failed marshalling.

See here for details on the template version API

Screenshot 2024-06-27 at 10 52 57


See here for the template creation API.

This is a bit different as it looks like it's a warning object instead of an array so it's a bit different as well.

Screenshot 2024-06-27 at 10 54 32

@bill-ezhao bill-ezhao requested a review from a team as a code owner June 27, 2024 17:54
@bill-ezhao bill-ezhao force-pushed the fix/warning-message-error branch from 3d16134 to 5a4aa17 Compare June 27, 2024 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant